#include <Arduino.h>
#include "TFT_eSPI.h"
TFT_eSPI tft;
int Pin_Blk=46;

void st7789_display_test()
{
  pinMode(Pin_Blk,OUTPUT);//设置引脚功能
  digitalWrite(Pin_Blk,HIGH);//设置高电平
  tft.init();
  tft.fillScreen(TFT_BLACK);
  tft.drawRect(0, 0, tft.width(), tft.height(), TFT_GREEN);
  // Set "cursor" at top left corner of display (0,0) and select font 4
  tft.setCursor(0, 4, 4);
  // Set the font colour to be white with a black background
  tft.setTextColor(TFT_RED);
  // We can now plot text on screen using the "print" class
  tft.println(" 1234\n");
  tft.println(" ip");
  tft.setTextColor(TFT_RED);
  tft.println(" Red text");
  tft.setTextColor(TFT_GREEN);
  tft.println(" Green text");
  tft.setTextColor(TFT_BLUE);
  tft.println(" Blue text");
}
void setup() {
  // put your setup code here, to run once:
  st7789_display_test();
  // digitalWrite(Pin_Blk,LOW);//设置低电平
}

void loop() {
  // put your main code here, to run repeatedly:

}